package com.chixing.day07_abstract;

public class Company {
    //属性
    private int companyId;
    private String companyName;
    private String companyType;
    private String compantAddress;
    private long companyTelno;

    //构造函数

    public Company(){}
    public Company(int companyId, String companyName, String companyType, String compantAddress, long companyTelno) {
        this.companyId = companyId;
        this.companyName = companyName;
        this.companyType = companyType;
        this.compantAddress = compantAddress;
        this.companyTelno = companyTelno;
    }

    //属性赋值
    //成员方法 method
    public void setCompanyId(int companyId){
        this.companyId = companyId;
    }
    public void setCompanyName(String companyName){
        this.companyName = companyName;
    }
    public void setCompanyType(String companyType){
        this.companyType = companyType;
    }
    public void setCompantAddress(String compantAddress){
        this.compantAddress = compantAddress;
    }
    public void setCompanyTelno(long companyTelno){
        this.companyTelno = companyTelno;
    }
    //属性取值
    public int getCompanyId(){
        return this.companyId;
    }
    public String getCompanyName(){
        return this.companyName;
    }
    public String getCompanyType(){
        return this.companyType;
    }
    public String getCompantAddress(){
        return this.compantAddress;
    }
    public long getCompanyTelno(){
        return this.companyTelno;
    }


    @Override
    public String toString() {
        return "Company{" +
                "companyId=" + companyId +
                ", companyName='" + companyName + '\'' +
                ", companyType='" + companyType + '\'' +
                ", compantAddress='" + compantAddress + '\'' +
                ", companyTelno=" + companyTelno +
                '}';
    }
}
